package com.terrynoya.fight.combat
{
	import com.terrynoya.geom.MVector2D;

	public class HitDefinition
	{
		private var _shakeTime:int;
		private var _pauseTime:int;
		
		private var _fall:Boolean;
		private var _fallAnimationType:int;
		
		private var _airAnimationType:int;
		private var _airAttackEffect:int;
		private var _airHitTime:int;
		private var _airVelocity:MVector2D;
		
		private var _groundAnimationType:int;
		private var _groundAttackEffect:int;
		private var _groundHitTime:int;
		private var _groundVelocity:MVector2D;
		private var _groundSlideTime:int;
		
		private var _groundGuardVelocity:MVector2D;
		
		private var _airGuardVelocity:MVector2D;
		
		private var _yAcceleration:Number;
		
		private var _fallVelocityY:Number;
		private var _fallVelocityX:Number;
		private var _fallVelocityXSetted:Boolean;
		
		private var _guardDistance:Number;
		private var _guardHitTime:int;
		private var _guardSlideTime:int;
		
		private var _p1NewState:int;
		private var _p1NewStateSetted:Boolean;
		private var _p2NewState:int;
		private var _p2NewStateSetted:Boolean;
		
		private var _p2UseP1State:Boolean;
		
		private var _sparkAnimation:int;
		private var _sparkPosition:MVector2D;
		private var _playerSpark:Boolean;
		
		private var _targetId:int;
		
		public function HitDefinition()
		{
			this._groundVelocity = new MVector2D();
		}

		public function get targetId():int
		{
			return _targetId;
		}

		public function set targetId(value:int):void
		{
			_targetId = value;
		}

		public function get playerSpark():Boolean
		{
			return _playerSpark;
		}

		public function set playerSpark(value:Boolean):void
		{
			_playerSpark = value;
		}

		public function get sparkPosition():MVector2D
		{
			return _sparkPosition;
		}

		public function set sparkPosition(value:MVector2D):void
		{
			_sparkPosition = value;
		}

		public function get sparkAnimation():int
		{
			return _sparkAnimation;
		}

		public function set sparkAnimation(value:int):void
		{
			_sparkAnimation = value;
		}

		public function get p2UseP1State():Boolean
		{
			return _p2UseP1State;
		}

		public function set p2UseP1State(value:Boolean):void
		{
			_p2UseP1State = value;
		}

		public function get p1NewStateSetted():Boolean
		{
			return _p1NewStateSetted;
		}

		public function get p2NewState():int
		{
			return _p2NewState;
		}

		public function set p2NewState(value:int):void
		{
			_p2NewState = value;
			this._p2NewStateSetted = true;
		}

		public function get p1NewState():int
		{
			return _p1NewState;
		}

		public function set p1NewState(value:int):void
		{
			_p1NewState = value;
			this._p1NewStateSetted = true;
		}

		public function get groundSlideTime():int
		{
			return _groundSlideTime;
		}

		public function set groundSlideTime(value:int):void
		{
			_groundSlideTime = value;
		}

		public function get guardSlideTime():int
		{
			return _guardSlideTime;
		}

		public function set guardSlideTime(value:int):void
		{
			_guardSlideTime = value;
		}

		public function get guardHitTime():int
		{
			return _guardHitTime;
		}

		public function set guardHitTime(value:int):void
		{
			_guardHitTime = value;
		}

		public function get guardDistance():Number
		{
			return _guardDistance;
		}

		public function set guardDistance(value:Number):void
		{
			_guardDistance = value;
		}

		public function get fallVelocityXSetted():Boolean
		{
			return _fallVelocityXSetted;
		}

		public function get fallVelocityX():Number
		{
			return _fallVelocityX;
		}

		public function set fallVelocityX(value:Number):void
		{
			_fallVelocityX = value;
			this._fallVelocityXSetted = true;
		}

		public function get fallVelocityY():Number
		{
			return _fallVelocityY;
		}

		public function set fallVelocityY(value:Number):void
		{
			_fallVelocityY = value;
		}

		public function get airAttackEffect():int
		{
			return _airAttackEffect;
		}

		public function set airAttackEffect(value:int):void
		{
			_airAttackEffect = value;
		}

		public function get yAcceleration():Number
		{
			return _yAcceleration;
		}

		public function set yAcceleration(value:Number):void
		{
			_yAcceleration = value;
		}

		public function get airGuardVelocity():MVector2D
		{
			return _airGuardVelocity;
		}

		public function set airGuardVelocity(value:MVector2D):void
		{
			_airGuardVelocity = value;
		}

		public function get groundGuardVelocity():MVector2D
		{
			return _groundGuardVelocity;
		}

		public function set groundGuardVelocity(value:MVector2D):void
		{
			_groundGuardVelocity = value;
		}

		public function get airHitVelocity():MVector2D
		{
			return _airVelocity;
		}

		public function set airHitVelocity(value:MVector2D):void
		{
			_airVelocity = value;
		}

		public function get groundVelocity():MVector2D
		{
			return _groundVelocity;
		}

		public function set groundVelocity(value:MVector2D):void
		{
			_groundVelocity = value;
		}

		public function get groundAttackEffect():int
		{
			return _groundAttackEffect;
		}

		public function set groundAttackEffect(value:int):void
		{
			_groundAttackEffect = value;
		}

		public function get groundAnimationType():int
		{
			return _groundAnimationType;
		}

		public function set groundAnimationType(value:int):void
		{
			_groundAnimationType = value;
		}

		public function get airAnimationType():int
		{
			return _airAnimationType;
		}

		public function set airAnimationType(value:int):void
		{
			_airAnimationType = value;
		}

		public function get fallAnimationType():int
		{
			return _fallAnimationType;
		}

		public function set fallAnimationType(value:int):void
		{
			_fallAnimationType = value;
		}

		public function get fall():Boolean
		{
			return _fall;
		}

		public function set fall(value:Boolean):void
		{
			_fall = value;
		}

		public function get p2NewStateSetted():Boolean
		{
			return _p2NewStateSetted;
		}

		public function get airHitTime():int
		{
			return _airHitTime;
		}

		public function set airHitTime(value:int):void
		{
			_airHitTime = value;
		}

		public function get groundHitTime():int
		{
			return _groundHitTime;
		}

		public function set groundHitTime(value:int):void
		{
			_groundHitTime = value;
		}

		public function get pauseTime():int
		{
			return _pauseTime;
		}

		public function set pauseTime(value:int):void
		{
			_pauseTime = value;
		}

		public function get shakeTime():int
		{
			return _shakeTime;
		}

		public function set shakeTime(value:int):void
		{
			_shakeTime = value;
		}
		
		public function setDef(value:HitDefinition):void
		{
			this.pauseTime = value.pauseTime;
			this.shakeTime = value.shakeTime;
			this.groundHitTime = value.groundHitTime;
			this.groundSlideTime = value.groundSlideTime;
			this.groundAttackEffect = value.groundAttackEffect;
			this.groundVelocity = value.groundVelocity;
			this.fall = value.fall;
			this.yAcceleration = value.yAcceleration;
			this.airAttackEffect = value.airAttackEffect;
			this.airAnimationType = value.airAnimationType;
			this.airHitVelocity = value.airHitVelocity;
			this.fallAnimationType = value.fallAnimationType;
			this.fallVelocityY = value.fallVelocityY;
			this.guardDistance = value.guardDistance;
			this.guardHitTime = value.guardHitTime;
			this.guardSlideTime = value.guardSlideTime;
			this.groundGuardVelocity = value.groundGuardVelocity;
			this.airGuardVelocity = value.airGuardVelocity;
			if(value.p1NewStateSetted)
			{
				this.p1NewState = value.p1NewState
			}
			if(value.p2NewStateSetted)
			{
				this.p2NewState = value.p2NewState
			}
			this.sparkAnimation = value.sparkAnimation;
			this.sparkPosition = value.sparkPosition;
			this.playerSpark = value.playerSpark;
			this.targetId = value.targetId;
		}
	}
}